package com.springcloud.zull;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.springcloud.zull.feign.Service1GetFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @author wfh
 */
@EnableEurekaClient
@SpringBootApplication
@Slf4j
@EnableDiscoveryClient
@EnableFeignClients(clients = {Service1GetFeignClient.class})
@MapperScan("com.springcloud.zull.mapper")
public class Service1Application {

    public static void main(String[] args) {
        SpringApplication.run(Service1Application.class, args);
        log.info("Service1Application starting ============================");
    }

    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}
